<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Document</title>
</head>
<body>
  <h2>成功的javascript开发者的7个习惯</h2>
    <dl>
        <dd>handerError</dd>

    </dl>
  <script type="text/javascript">
        window.onerror = handleError;
        var s = null;
        s.toString();
        function handleError(desc , page , line ) {
            s = "An unexpected javascript error has occurred. ";
            s += "We apologize unreservedly!\n\n";
            s += "Page '4.html' line "+line+"\n";
            s += "Description:"+desc+"\n\n";
            s += "Please contace customer support at xxxx";
            alert(s);
        }
  </script>

</body>
</html>
